package com.wmh.baseservice.admin.pojo.vo.role;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author 谢骏
 * @date 2023/2/13 16:35
 **/
@ApiModel(value="添加角色请求VO")
@Data
@Accessors(chain = true)
public class AddOrUpdateRoleReqVO implements Serializable {

    @ApiModelProperty(value = "角色ID")
    private Long id;

    @ApiModelProperty(value = "角色名称")
    @Length(min = 2, max = 20, message = "角色名长度在 2 至 20 个字符")
    @NotBlank(message = "角色名长度在 2 至 20 个字符")
    private String roleName;

    @ApiModelProperty(value = "账号限定数量")
    @Min(value = 1 , message = "开放账号数量不能小于 1 大于 999")
    @Max(value = 999 , message = "开放账号数量不能小于 1 大于 999")
    private Integer accountNum;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "状态编号")
    @NotNull(message = "请上传状态编号")
    private Integer status;

    @ApiModelProperty(value = "分配菜单的 id 列表 JSON 字符串格式")
    private String menuIds;

    static final long serialVersionUID = 1;
}
